<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Office中心</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <script src="__PUBLIC__/Weixin/js/jquery-3.3.1.min.js?version={$version}"></script>
    <script src="__PUBLIC__/Weixin/js/jquery.cookie.js?version={$version}"></script>
    <script src="__PUBLIC__/Weixin/js/function.js?version={$version}"></script>
    <script src="__PUBLIC__/Weixin/js/login.js?version={$version}"></script>
    <link rel="stylesheet" href="__PUBLIC__/Weixin/css/weui.css?version={$version}">
    <link rel="stylesheet" href="__PUBLIC__/Weixin/css/jquery-weui.css?version={$version}">
    <link rel="stylesheet" href="__PUBLIC__/Weixin/css/style.css?version={$version}">
    <script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js?version={$version}"></script>
    <style>
        .weui-media-box_appmsg .weui-media-box__hd {
            width: 130px;
            height: 130px;
        }
        .pr-h4{
            padding-top:0px;
        }
        .pr-h{
            line-height:1.2;
        }
        .pr-p{
            margin-bottom:-8px;
            font-size:14px;
            margin-top: 30px;
        }
        .weui-media-box h4{
            font-weight:normal;
            font-size:20px;
            color:#333;
            position: relative;
        }
        .weui-media-box {
            padding: 12px 11px !important;
            position: relative;
        }
        .weui-media-box .hot{
            position: absolute;
            background: url("/Public/office/images/label_recommend_big.png") no-repeat center center;
            background-size: 100%;
            width: 30px;
            height: 20px;
            right: -25px;
            top: -16px;
        }
        .weui-media-box .limited_hot{
            position: absolute;
            background: url("/Public/office/images/label_sales.png") no-repeat center center;
            background-size: 100%;
            width: 54px;
            height: 20px;
            right: 38px;
            top: -10px;
        }
        .weui-media-box .limited2_hot{
            position: absolute;
            background: url("/Public/office/images/label_1.2.png") no-repeat center center;
            background-size: 100%;
            width: 75px;
            height: 23px;
            right: -54px;
            top: -28px;
        }
        .weui-media-box .hot2{
            position:absolute;
            background:url("__PUBLIC__/office/images/label_recommend_big.png") no-repeat center center;
            background-size:100%;
            width: 30px;
            height: 25px;
            right: -23px;
            top: -18px;
        }
        .weui-media-box .hot3{
            position:absolute;
            background:url("__PUBLIC__/office/images/label_recommend_big.png") no-repeat center center;
            background-size:100%;
            width: 30px;
            height: 25px;
            right: -8px;
            top: -4px;
        }
        .money{
            color:#de2c2c;
            font-size:27px;
            font-weight:bold;
        }
        .title{
            #color:#9b9b9b;
            font-size:14px;
        }
        .icon-1{
            background:url("__PUBLIC__/office/images/icon_yh.png")no-repeat center center;
            background-size:100%;
        }
        .icon-2{
            background:url("__PUBLIC__/office/images/icon_ycc.png")no-repeat center center;
            background-size:100%;
        }
        .icon-3{
            background:url("__PUBLIC__/office/images/icon_pad.png")no-repeat center center;
            background-size:100%;
        }
        .icon-4{
            background:url("__PUBLIC__/office/images/icon_pad.png")no-repeat center center;
            background-size:100%;
        }
        .icon-5{
            background:url("__PUBLIC__/office/images/icon_bt.png")no-repeat center center;
            background-size:100%;
        }
        .icons{
            display: inline-block;
            width:16px !important;
            height:16px !important;
            vertical-align: bottom;
            margin-right:-6px;
        }
        .weui-media-box .weui-media-box__desc{
            margin-bottom:8px;
            line-height: 16px;
            color:#666;
            font-size:12px;
        }
        .btn{
            width:135px;
            height:35px;
            line-height:35px;
            #background:#d83b01;
            display: inline-block;
            text-align: center;
            color:#fff;
            float:right;
            font-size:14px;
            background-image:url('__PUBLIC__/office/images/btn_bk.png');
        }
        .weui-media-box__desc{
            padding:0 8px;
        }
        .weui-border{
            border-bottom:1px dashed #eee;
            padding-bottom: 15px;
        }

        .weui-p p{
            margin-bottom:6px !important;
            margin-top:10px !important;
            line-height:20px;
            font-size: 12px;
        }
        .footer{
            text-align: center;
            margin-top:30px;
            margin-bottom:10px;
        }
        .footer h4{
            padding-bottom:2px;
            font-size:20px;
            font-weight: 500;
        }
        .footer span{
            color:#333;
            display: inline;
            padding-top:2px;
            font-size:14px;
            border-top: 1px solid #d9d9d9;
        }
        .footer img {
            width:148px;
            display: inline-block;
            margin-top:14px;
        }
        .pr-title{
            font-size:12px;
            color:#de2c2c;
            padding-left: 2px;
        }
        .box-btn{
            padding-right:10px;
            margin-top:10px;
            height:35px;
        }
        .tisi{
            margin-bottom:5px;
            color:#333;
        }
        .weui-background{
            background:url("__PUBLIC__/office/images/back.png")no-repeat center center;
            background-size:100%;
            padding-bottom:10px;
        }
        .weui-media-box:before {
            content: " ";
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            height: 1px;
            border-top: 1px solid #fff !important;
        }
        .pay{
            color:#de2c2c;
            text-decoration:underline;
        }
        .wenxin{
            font-size:14px !important;
        }

        .ff{
            height:20px;
        }
        .vip{
            width:100px;
            height:30x;
            padding-bottom:10px;
        }
        .vip-2016{
            width:110px;
            height:21px;
        }
        .pr-{
            line-height:1.2;
            margin-top:18px;
            font-size: 13px;
            margin-bottom: -3px;
        }
        @media only screen and (max-width:321px){
            .weui-media-box h4 {
                font-weight: normal;
                font-size:15px;
                color: #333;
                position: relative;
            }
            .weui-media-box .hot{
                position:absolute;
                background:url("__PUBLIC__/office/images/label_recommend_big.png") no-repeat center center;
                background-size:100%;
                width: 25px;
                height: 17px;
                right: -22px;
                top: -15px;
            }
            .weui-media-box .hot2{
                position:absolute;
                background:url("__PUBLIC__/office/images/label_recommend_big.png") no-repeat center center;
                background-size:100%;
                width: 25px;
                height: 17px;
                right: -23px;
                top: -15px;
            }
            .weui-media-box .hot3{
                position:absolute;
                background:url("__PUBLIC__/office/images/label_recommend_big.png") no-repeat center center;
                background-size:100%;
                width: 25px;
                height: 17px;
                right: -8px;
                top: -4px;
            }
            .pr-p{
                font-size:12px;
            }
            .money {
                color: #de2c2c;
                font-size: 22px;
                font-weight: bold;
            }
            .title{
                padding-left:0px;
                #color: #9b9b9b;
                font-size: 12px;
            }
            .weui-background2{
                padding-bottom:30px;
            }
            .weui-media-box {
                padding-bottom:0 !important;
                position: relative;
                width:347px;
                height:135px;
            }
            .btn-img {
                #width:120px !important;
                #height:auto!important ;
                #margin-left:10px;
                #margin-top:10px;
                #display: inline-block!important ;
            }
            .pro_line {
                width: 20px !important;
                left: 42px !important;
            }
            .weui-media-box .limited_hot {
                right: 20px !important;
            }
            .box-btn {
                margin-bottom:20px;
            }
            .box-btn748{
                margin-bottom:0px;
            }

        }
        .weui-num {
            color: #de2c2c;
            font-weight: bold;
        }
        .winxin {
            font-size:16px;
        }
        .pr-p2 {

        }
        .pr-height{
            height:118px;
        }
        .btn-img {
            width:140px;
            height:15px;
        }
        .btn-img2 {
            width:56px;
            height:15px;
        }
        .sale{
            vertical-align: inherit;
            padding-left:10px;
            width:78px;
        }
        .pro_line {
            display: inline-block;
            height: 2px;
            width: 55px;
            background: #d83b01;
            position: absolute;
            left: 142px;
            top: 22px;
            z-index: 1000;
        }
        .pr-lines {
            position: relative;
        }
        .weui-pic-all {
            margin-bottom: 1px !important;
        }
        .specil-box {
            color:#de2c2c;
            font-weight: bold;
        }

        /*弹窗*/
        .mask {
            width: 100%;
            height: 100%;
            background-color: #000;
            opacity: .5;
            position: fixed;
            left: 0;
            top: 0;
            z-index: 1000;
            display:none
        }
        .anmo{
            width: 330px;
            height: 400px !important;
            background-color: #fff;
            border-radius: 8px;
            position: fixed;
            left: 50%;
            top: 50%;
            margin-left: -165px;
            margin-top: -222px;
            z-index: 1001;
            -webkit-animation: alertAnimation 0.3s ease-in-out 0 1;
            background: url(__PUBLIC__/office/images/pic2.png)no-repeat;
            background-size: 330px 400px;
            display:none;
        }
        .tip{
            text-align: center;
            font-weight: bold;
            color:#6d2a02;
            font-size:16px;
            padding-top:5px;
            padding-bottom:5px;
            cursor:pointer;
            width:100px;
            margin:0 auto;
        }
        .btn-close{
            width:30px;
            margin:0 auto;
            cursor:pointer;
            margin-top:60px;
            text-align: center;
        }
        .btn-close-img{
            width:30px;
            height:30px;
            text-align: center;
        }
        .anmo-top{
            height:323px;
        }
        @media (min-device-width : 375px) and (max-device-width : 667px) and (-webkit-min-device-pixel-ratio : 2){
            /*iphone 6*/
        }

        @media (min-device-width : 414px) and (max-device-width : 736px) and (-webkit-min-device-pixel-ratio : 3){}
        /*iphone 6 plus*/
        /*弹窗结束*/
    </style>

    <script>
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: "{$id}", // 必填，公众号的唯一标识
            timestamp: "{$date}", // 必填，生成签名的时间戳
            nonceStr: "{$str}", // 必填，生成签名的随机串
            signature: "{$signature}",// 必填，签名
            jsApiList: [
                "onMenuShareAppMessage",
                "onMenuShareTimeline"
            ] // 必填，需要使用的JS接口列表
        });

        var url = "http://"+window.location.host+window.location.pathname+"?c_code={$channelCode}";

        wx.ready(function () {   //需在用户可能点击分享按钮前就先调用
            wx.onMenuShareAppMessage({ //分享给朋友
                title: '每人每天低至0.23元的Office重磅升级', // 分享标题
                desc: '8款熟悉的应用，为忙到飞起的你简化操作，办公更高效！Skr！Skr！', // 分享描述
                link: url, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: 'http://cdn.office.store.zhuazi.com/pic/wechat/share/share_pic.png', // 分享图标
                type: '', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function () {
                    // 用户点击了分享后执行的回调函数
                }
            });
            wx.onMenuShareTimeline({
                title: '每人每天低至0.23元的Office重磅升级', // 分享标题
                link: url, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: 'http://cdn.office.store.zhuazi.com/pic/wechat/share/share_pic.png', // 分享图标
                success: function () {
                    // 用户点击了分享后执行的回调函数
                }
            });
        });
    </script>

</head>
<body>
<div class="weui-panel__bd weui-border">
    <div class="weui-media-box weui-media-box_appmsg">
            <img class="weui-media-box__thumb" src="__PUBLIC__/office/images/365_home_s1.png">
    </div>
    <div class="weui-media-box weui-media-box_text">
        <div class="weui-background">
            <div class="page flex js_show">
                <div class="page__bd page__bd_spacing">
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-1 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc"><span class="specil-box">1人使用</span></p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-2 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc">送价值<span class="weui-num">￥480</span>/年的云存储空间</p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-5 icons"></span></div></div>
                        <div class="weui-flex__item">
                            <div class="placeholder">
                                <p class="weui-media-box__desc weui-pic-all">包含7款应用</p>
                                <p class="weui-media-box__desc" style="letter-spacing:0.1px"><img class="btn-img" src="__PUBLIC__/office/images/icon_pro2.png"></p>
                            </div>
                        </div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-4 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc">可在多台电脑/Mac、平板电脑和手机上使用(包括 Windows、iOS和Android)</p></div></div>
                    </div>
                </div>
            </div>
            <div class="box-btn">
                <a href="javascript:;" data="1274c85c9791c16dca2ff87dd927317e" class="btn subscribe">立即购买</a>
            </div>
        </div>
    </div>
</div>
<div class="weui-panel__bd weui-border">
    <div class="weui-media-box weui-media-box2 weui-media-box_appmsg">
            <img class="weui-media-box__thumb" src="__PUBLIC__/office/images/2016_1.png">
    </div>
    <div class="weui-media-box weui-media-box_text">
        <div class="weui-background">
            <div class="page flex js_show">
                <div class="page__bd page__bd_spacing">
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-3 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc">仅支持1台 Windows PC</p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-5 icons"></span></div></div>
                        <div class="weui-flex__item">
                            <div class="placeholder">
                                <p class="weui-media-box__desc weui-pic-all">包含3款应用</p>
                                <p class="weui-media-box__desc" style="letter-spacing:0.1px"><img class="btn-img2" src="__PUBLIC__/office/images/icon_pro3.png"></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="box-btn box-btn748">
                <a href="javascript:;" data="b85141e007ea742bb705f6960b7d57b0" class="btn subscribe">立即购买</a>
            </div>
        </div>
    </div>
</div>
<div class="weui-panel__bd weui-border">
    <div class="weui-media-box weui-media-box_appmsg">
            <img class="weui-media-box__thumb" src="__PUBLIC__/office/images/365_personal_1.png">
    </div>
    <div class="weui-media-box weui-media-box_text">
        <div class="weui-background">
            <div class="page flex js_show">
                <div class="page__bd page__bd_spacing">
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-1 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc"><span class="specil-box">1人使用</span></p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-2 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc" style="letter-spacing:0.1px">送价值<span class="weui-num">￥480</span>/年的云存储空间 (1TB)</p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-5 icons"></span></div></div>
                        <div class="weui-flex__item">
                            <div class="placeholder">
                                <p class="weui-media-box__desc weui-pic-all">包含7款应用</p>
                                <p class="weui-media-box__desc" style="letter-spacing:0.1px"><img class="btn-img" src="__PUBLIC__/office/images/icon_pro2.png"></p>
                            </div>
                        </div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-4 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc">可在多台电脑/Mac、平板电脑和手机上使用(包括 Windows、iOS和Android)</p></div></div>
                    </div>
                </div>
            </div>
            <div class="box-btn">
                <a href="javascript:;" data="02804067beae3da1faa4ff72edf33f20" class="btn subscribe">立即购买</a>
            </div>
        </div>
    </div>
</div>
<div class="weui-panel__bd ">
    <div class="weui-media-box weui-media-box_appmsg">
        <img class="weui-media-box__thumb" src="__PUBLIC__/office/images/365_home_1.png">
    </div>
    <div class="weui-media-box weui-media-box_text ">
        <div class="weui-background weui-background2">
            <div class="page flex js_show">
                <div class="page__bd page__bd_spacing">
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-1 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc"><span class="specil-box">6人共享</span></p></div></div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-2 icons"></span></div></div>
                        <div class="weui-flex__item">
                            <div class="placeholder">
                                <p class="weui-media-box__desc" style="letter-spacing:0.1px">送价值<span class="weui-num">￥600</span>/年的云存储空间 (合计6TB, 每人1TB)</p>
                            </div>
                        </div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-5 icons"></span></div></div>
                        <div class="weui-flex__item">
                            <div class="placeholder">
                                <p class="weui-media-box__desc weui-pic-all">包含7款应用</p>
                                <p class="weui-media-box__desc" style="letter-spacing:0.1px"><img class="btn-img" src="__PUBLIC__/office/images/icon_pro2.png"></p>
                            </div>
                        </div>
                    </div>
                    <div class="weui-flex">
                        <div><div class="placeholder"><p class="weui-media-box__desc"><span class="icon-4 icons"></span></div></div>
                        <div class="weui-flex__item"><div class="placeholder"><p class="weui-media-box__desc">可在多台电脑/Mac、平板电脑和手机上使用(包括 Windows、iOS和Android)</p></div></div>
                    </div>
                </div>
            </div>
            <div class="box-btn">
                <a href="javascript:;" data="bb6d01050605000fba16597e6dc5ae28" class="btn subscribe">立即购买</a>
            </div>
        </div>
    </div>
</div>
<div class="weui-media-box_text weui-p">
    <p class="weui-media-box__desc tisi winxin">温馨提示:</p>
    <p class="weui-media-box__desc tisi">1.支付后，<span class="pay">激活密钥 / 激活链接 / 激活安装教程</span>会发送至微信公众号, 您还可以通过"我的订单"查看</p>
    <p class="weui-media-box__desc tisi">2.软件激活密钥 / 激活链接属于虚拟化数字产品，一经售出，不予退换</p>
</div>
<div class="footer">
    <h4>办公技巧专家</h4>
    <p><span>体验新时代的办公方式</span></p>
    <img src="__PUBLIC__/office/images/pic_code.png">
</div>

<!-- 弹窗-->
<div class="mask"></div>
<div class="anmo">
    <div class="anmo-top"></div>
    <div class="tip">立即领取优惠</div>
    <div class="btn-close">
        <img  class="btn-close-img"  src="__PUBLIC__/office/images/btn_close2.png">
    </div>
</div>

<div class="ff">

</div>
<script>

    var hj = "{$hj}"=="product"?true:false;

    var _debug = false;
    if(window.location.href.indexOf("test") != -1){
        _debug = true;
    }

    if(_debug){
        window.onerror = function (msg,url,l) {
            alert(msg);
        }
    }

    //_debug && alert(1);

    if(hj){
        var _hmt = _hmt || [];
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?3f56b769ceb8f4b21bb181eae21c2097";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);

        _hmt.push(['_trackEvent','productList','view',"Office中心页面访问"]);
        _hmt.push(['_trackEvent','productList','view',"{$channelName}"]); //渠道
    }

    //_debug && alert(2);

    //
    sendTagLog("inOfficeCore",true);

    var jsApiParameters = { };
    var order_token = '';
    var productList = {$productList};
    var c_code = "{$channelCode}";
    var tt ;

    $(".subscribe").click(function(){
        //_debug && alert(3);
        var productToken = $(this).attr("data");
//        alert(productList[productToken])
        if(hj){
            _hmt.push(['_trackEvent','productList','click',productList[productToken]]);
        }

      //  _debug && alert(4);

        $.ajax({
            type: "post",
            url: "/weixinapi/pay/qrcode",
            //url: "/api/index.php/weixinuser/openid",
            async:false, //同步
            data: {"token":webuser.data.token,"product_token":productToken,"buy_position":"wechat","two_purchase":1,"channel":c_code,"openid":webuser.data.openid},
            dataType: "json",
            success: function(data){

               // _debug && alert(5);

                if(data.code == 200){

                   // _debug && alert(6);

                    tt = data.data['_time']
                    // alert(data.data.order_token);
                    jsApiParameters = JSON.parse(data.data.jsApiParameters);
                    order_token = data.data.order_token;
                    //alert(1 + jsApiParameters.appId);
                    callpay();

                    //window.location.href = data.data.url+"?end=wechatWeb";
                }

                //_debug && alert(6);

            }
        });

    });


    //调用微信JS api 支付
    function jsApiCall()
    {
        //alert( 4 + "" + jsApiParameters.appId);

        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',
            jsApiParameters,
            function(res){
//                WeixinJSBridge.log(res.err_msg);
                // alert(res.err_code+res.err_desc+res.err_msg+"   "+tt);
                //
                if(res.err_msg == "get_brand_wcpay_request:ok" ){
                    sleep(1500);
                    window.location.href="{:U('/Office/pay/wxwebmsg','status=success')}"+"?order_token="+order_token;
                }else if(res.err_msg == "get_brand_wcpay_request:cancel" ){
                    sendTagLog("inPaypageCancel",false);
                    $(".mask").fadeIn();
                    $('.anmo').fadeIn();
                    if(hj) {
                        _hmt.push(['_trackEvent','wxpop','view','弹窗吊起数']);
                    }
                    //window.location.href="{:U('/weixin/product/splitDetail','','html')}"+"?c_code="+c_code;
                }else if(res.err_msg == "get_brand_wcpay_request:fail" ){
                    sendTagLog("inPaypageCancel",false);
                    $(".mask").fadeIn();
                    $('.anmo').fadeIn();
                    if(hj) {
                        _hmt.push(['_trackEvent','wxpop','view','弹窗吊起数']);
                    }
                    //window.location.href="{:U('/weixin/product/splitDetail','','html')}"+"?c_code="+c_code;
                }
            }
        );
    }

    function callpay()
    {
        //alert(2 + jsApiParameters.appId);

//        _hmt.push(['_trackEvent','pay_wechat','click',"确认支付按钮点击"]);
        if (typeof WeixinJSBridge == "undefined"){

            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{

            jsApiCall();
        }
    }

    function sleep(numberMillis) {
        var now = new Date();
        var exitTime = now.getTime() + numberMillis;
        while (true) {
            now = new Date();
            if (now.getTime() > exitTime)
                return;
        }
    }



    $(function() {

        var url = window.location.toString();
        var id = url.split('#')[1];
        /*
        var codeArr = ['YD01_Qjuye10','YD03_WRWX','YD05_EHome','YD06_Office1','PPT_ppt1080','plat_wxpage','YD04_TW666','YD10_TW02','YD11_TW03','YD12_TW04','YD13_VIPuser','YD14_Course','YD16_Tplate','YD18_Inpage1','YD18_Inpage2','YD18_Inpage3','YD18_Inpage4','YD19_Nopage1','YD19_Nopage2','YD19_Nopage3','YD19_Nopage4'];
        var new_code = 'YD20_Retain';
        for (var c in codeArr) {
            if (c_code == codeArr[c]) {
                new_code = c_code;
                break;
            }
        }*/
        //var locationUrl = "{:U('/weixin/product/splitDetail','','html')}"+"?c_code="+new_code;
        var locationUrl = "{:U('/weixin/product/splitDetail','','html')}"+"?c_code="+c_code;
        if(id){
            $("#"+id+"_tab").siblings().removeClass("weui-bar__item_on");
            $("#"+id+"_tab").addClass("weui-bar__item_on");
            $("#" + id).siblings().css('display', 'none');
            $("#" + id).css('display', 'block');
            $('html, body').animate({scrollTop: $('#top').offset().top}, 0);
        }

        $('.weui-navbar__item').on('click',function() {
            var id = $(this).attr("data-id");

            $(this).siblings().removeClass("weui-bar__item_on");
            $(this).addClass("weui-bar__item_on");
            $("#" + id).siblings().css('display', 'none');
            $("#" + id).css('display', 'block');

            $('html, body').animate({scrollTop: $('#top').offset().top}, 500);

        });

        $(".anmo-top").click(function (){
            $(".mask").fadeOut();
            $('.anmo').fadeOut();
            if(hj) {
                _hmt.push(['_trackEvent','wxpop','click','其他点击数']);
            }
            window.location.href=locationUrl;
        });
        $(".tip").click(function (){
            $(".mask").fadeOut();
            $('.anmo').fadeOut();
            if(hj) {
                _hmt.push(['_trackEvent','wxpop','click','按钮点击数']);
            }
            window.location.href=locationUrl;
        });
        $(".btn-close").click(function (){
            $(".mask").fadeOut();
            $('.anmo').fadeOut();
            if(hj) {
                _hmt.push(['_trackEvent','wxpop','click','关闭点击数']);
            }
            window.location.href= locationUrl;
        });

    });


</script>
</body>

</html>